student_scores = {}

# 记录学生成绩函数
def record_score(name, score):
    student_scores[name] = score
    print(f"{name} 的成绩已记录")

# 查询学生成绩函数
def query_score(name):
    if name in student_scores:
        print(f"{name} 的成绩是 {student_scores[name]}")
    else:
        print(f"未找到 {name} 的成绩记录")

# 统计平均成绩函数
def calculate_average_score():
    if not student_scores:
        return 0
    total_score = sum(student_scores.values())
    return total_score / len(student_scores)

# 统计最高成绩函数
def find_max_score():
    if not student_scores:
        return 0
    return max(student_scores.values())

# 统计最低成绩函数
def find_min_score():
    if not student_scores:
        return 0
    return min(student_scores.values())

# 示例使用
record_score("张三", 85)
record_score("李四", 90)
query_score("张三")
average_score = calculate_average_score()
max_score = find_max_score()
min_score = find_min_score()
print(f"平均成绩: {average_score}")
print(f"最高成绩: {max_score}")
print(f"最低成绩: {min_score}") 
